<%@ page import="entity.User" %><%--
  Created by IntelliJ IDEA.
  User: User
  Date: 2024/9/4
  Time: 15:32
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>

    <%
        User user= (User) request.getSession().getAttribute("user");
        if(user==null){
    %>
        <a href="<%=request.getContextPath()%>/session/register.jsp">注册</a>
        <a href="<%=request.getContextPath()%>/session/login.jsp">登录</a>
    <%
        }else{
    %>
        欢迎您:<%=user.getUsername()%>
        <a href="<%=request.getContextPath()%>/logout.code">注销</a>

    <%
        }
    %>



</body>
</html>
